Skip to content

chore(ci): stop blocking django migrations next to nodejs changes - #130701

Merged
trunk-io[bot] merged 3 commits into
masterfrom
chore/devex-drop-django-node-separation-rule
Nov 6, 2026
Merged

trunk-io[bot] merged 3 commits into
masterfrom
chore/devex-drop-django-node-separation-rule

Conversation

@webjunkie

@webjunkie webjunkie commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Changes

  • A Django migration and its Node reader can now go in one PR.
  • The Node deploy hook (charts#19479) holds each prod rollout until the image's Django migrations are applied, for one PR, a stack or a batch.
Rule After
Django + nodejs/ removed
ClickHouse + nodejs/ kept, no hook for ClickHouse
sqlx + nodejs/ kept, sqlx is shadow-only
sqlx + Rust service kept, no hook for Rust
  • The error text and docs say not to stack the remaining splits.

How did you test this code?

  • Not run: the workflow against a PR with ClickHouse migrations and nodejs/ changes.

Test rationale: a test would only restate the path filters.

Release status

  • No feature flag controls this change

Docs update

  • docs/published/handbook/engineering/safe-django-migrations.md, section 5.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, Opus 5.5 (claude-opus-5-5)

Skills: /authoring-ci-workflows, /writing-code-comments, /writing-pr-descriptions, /babysit-pr

More context for AI agents
  • Decisions: ClickHouse migrations split out of the old migrations filter so the ClickHouse + nodejs rule survives.
  • Decisions: the skip label stays; its text no longer names Django-only cases.
  • Decisions: the CI report's backend Python lane comes from the workflow file itself; the trunk-impacted-targets.js comment edit was reverted because it forced the universal lane.
  • Follow-ups: the comment beside this workflow in trunk-impacted-targets.js still says Django; any edit there puts a PR in the universal lane, so it waits for a PR that edits that script.
  • Follow-ups: drop the sqlx + nodejs rule once sqlx enforcement lands for cyclotron-node and behavioral-cohorts; persons stays shadow.
  • Read closely: the filter block and the error text in ci-migrations-service-separation-check.yml.

The same-PR rule never enforced the order it was meant to protect. It reads
each PR's own diff, so a migration layer stacked under a Node layer passes on
both, and the queue lands the stack in one go. Two separate PRs merged
minutes apart pass too. The check is also not a required status.

The Node deploy hook now holds every Node rollout in prod until the Django
migrations its image needs are applied, which covers one PR, a stack, and a
batch alike. With it, a migration and its Node reader in one PR is the safe
shape, not the risky one.

- drop the Django + nodejs rule
- keep ClickHouse + nodejs, split out of the old migrations filter, since the
  hook does not check ClickHouse
- keep sqlx + nodejs and sqlx + rust services, since sqlx is shadow-only and
  Rust has no hook
- point the docs and the error text at the hook, and say not to stack the
  remaining splits
@webjunkie webjunkie self-assigned this Nov 6, 2026
@trunk-io

trunk-io Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@webjunkie
webjunkie marked this pull request as ready for review November 6, 2026 07:51
@webjunkie

Copy link
Copy Markdown
Contributor Author

@codex review

@webjunkie
webjunkie requested a review from a team November 6, 2026 07:51
@parameterai

parameterai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Risk: No findings

This PR removes the CI rule that forced Django migrations and nodejs/ changes into separate PRs, keeping the ClickHouse and sqlx separation rules, and relies on the existing Node deploy hook (nodejs/src/schema-check/, baked into Dockerfile.node) to hold Node rollouts until required Django migrations are applied. I verified the hook exists, is wired into the image build, and that the renamed CI filter and its env variables are internally consistent. No security-relevant surface is touched.

Sentinel reviewed 8d0cd69 · Review settings

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T07:53:47.798051Z 8d0cd69 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 8d0cd6968d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Any edit to .github/scripts/trunk-impacted-targets.js puts the PR in the
universal Trunk lane, so it cannot merge in parallel. The comment there still
names Django migrations and is fixed in a later PR that edits the script.
@webjunkie webjunkie added the stamphog Request AI approval (no full review) label Nov 6, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The CI change enters risky territory, with assurance supplied by the author's owning-team membership. No substantive review concerns or policy-listed refusal grounds are present; the discussion-only bot summaries are not top-level reviews.

  • Author wrote 9% of the modified lines and has 50 merged PRs in these paths (familiarity MODERATE).
  • 👍 on the PR from chatgpt-codex-connector[bot].
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 40L, 1F substantive, 48L/2F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1b-small (48L, 2F, two-areas, chore)
stamphog 2.7.0 .stamphog/policy.yml @ e929092 · reviewed head e929092

@trunk-io
trunk-io Bot merged commit 5ff6a4a into master Nov 6, 2026
248 of 249 checks passed
@trunk-io
trunk-io Bot deleted the chore/devex-drop-django-node-separation-rule branch November 6, 2026 09:17
@deployment-status-posthog

deployment-status-posthog Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-11-06 09:36 UTC Run
prod-us ✅ Deployed 2026-11-06 09:52 UTC Run
prod-eu ✅ Deployed 2026-11-06 09:55 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant